home *** CD-ROM | disk | FTP | other *** search
- /* reset.c
- By Dalibor S. Kezele (Tel. ++385 (0)42 69 15 67)
- In Anno Domini 1994
-
- Compiled with Manx Aztec C V5.0a
- Usage: CC reset.c
- LN reset.o -LC16
-
- HAPPY PROGRAMMING !!
- */
-
- #include <pragmas.h>
- #include <intuition/intuition.h>
-
- struct IntuitionBase *IntuitionBase;
-
- #define ALERTTYPE RECOVERY_ALERT /* possible DEADEND_ALERT */
- #define ALERTSIZE 30L /* height of the ALERT */
-
- char *AlertText="\000\212\022LEFT BUTTON = Reset RIGHT BUTTON = Cancel\0\0";
-
- void main(void)
- {
-
- if(IntuitionBase=(struct IntuitionBase *)OpenLibrary("intuition.library", 0L)) {
-
- if(DisplayAlert(ALERTTYPE, AlertText, ALERTSIZE)) {
- #asm
- Reset move.l 4,a6
- lea Super(PC),a5
- jsr -30(a6)
- Super lea 2,a0
- RESET
- jmp (a0)
- #endasm
- } /* if */
- else
- DisplayBeep(NULL);
-
- CloseLibrary(IntuitionBase);
- exit(0);
- } /* if */
- else
- exit(1);
-
- } /* main */
-